
#include "md5.h"

#include <stdio.h>
#include <string.h>

int main(int argc, char **argv)
{
	int i = 0;
	MD5_CTX md5;

	unsigned char buf[16] = {0};
	
	if(argc != 2)
	{
		printf("Usage: %s STRING\n", argv[0]);
		return 0;
	}

	MD5Init(&md5);
	MD5Update(&md5, argv[1], strlen(argv[1]));  
	MD5Final(&md5, buf);

	for(i = 0; i < 16; i++)
	{
		printf("%02x", buf[i]);
	}
	printf("\n");
	return 0;
}
